var child_process = require('child_process');
var option = {maxBuffer:1000*1024,encoding:'utf8',timeout:5000}
var child = child_process.exec('dir '+process.cwd(),option,function(error,stdin,stdout){
	if(error){
		console.log(error.stack());
		console.log('error code:'+error.code);
		console.log('error signal:'+error.signal);
	}
	console.log('Results:\n'+stdout);
	if(error){
		console.log('errors:'+error);
	}
});
child.on('exit',function(code){
	console.log('complete with code:'+code);
});